package com.gw.controller;

import com.jfinal.core.Controller;
import com.jfinal.kit.PropKit;
import com.jfinal.kit.StrKit;
import com.jfinal.upload.UploadFile;

public class WangEditor extends Controller{
	private String fileName=null;
	public void upload(){
		UploadFile file=getFile();
		if(!StrKit.notNull(file)){
			renderText("error|请选择一张图片");
			return;
		}
		//获取文件名
		fileName=file.getFileName();
		System.out.println(file.getFile().getPath());
		System.out.println(fileName);
		
		renderText(PropKit.get("static_domain")+fileName);
	}

}
